//package com.qf.day09.aiTeamPk;
//
//public class BattleSimulation {
//    public static void main(String[] args) {
//        // 创建队员
//        Player player1 = new Player("Player 1", 10);
//        Player player2 = new Player("Player 2", 10);
//        Player player3 = new Player("Player 3", 10);
//
//        Player player4 = new Player("Player 4", 10);
//        Player player5 = new Player("Player 5", 10);
//        Player player6 = new Player("Player 6", 10);
//
//        // 创建队伍
//        Team team1 = new Team("Team A");
//        team1.addPlayer(player1);
//        team1.addPlayer(player2);
//        team1.addPlayer(player3);
//
//        Team team2 = new Team("Team B");
//        team2.addPlayer(player4);
//        team2.addPlayer(player5);
//        team2.addPlayer(player6);
//
//        // 开始战斗
//        while (!team1.getPlayers().isEmpty() && !team2.getPlayers().isEmpty()) {
//            System.out.println("Battle starts!");
//            team1.attack(team2, 5); // 假设每个队员的攻击力为5
//            team2.attack(team1, 5); // 假设每个队员的攻击力为5
//
//            // 检查是否有队员被击败
//            if (team1.getPlayers().isEmpty()) {
//                System.out.println("Team B wins!");
//                break;
//            }
//            if (team2.getPlayers().isEmpty()) {
//                System.out.println("Team A wins!");
//                break;
//            }
//        }
//    }
//}
